<?php

/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

namespace Admin\Model;
use Think\Model;

class GiftcardLeanCloudModel extends SyncModel{
    
    protected $tableName="giftcard";
    
    //leancloud表名
    protected $leancloudName = "Giftcard";

    //映射的字段
    protected $_map = array('objectId' => 'id','createdAt'=>'createdate', 'updatedAt'=>'lastupdate'); 
   
    //leancloud 字段类型
    protected $leancloudelds = array(
        "objectId"=>"String",
        "batchNo"=>"String",
        "code"=>"String",
        "amount"=>"Number",
        "isBind"=>"Number",
        "bindUid"=>"Number",
        "bindDate"=>"Date",
        "status"=>"Number",
        "createdAt"=>"Date",
        "updatedAt"=>"Date",
        'syncStatus'=>"Number"
    );
   
    //配置字段
    protected $fields = array(
        'objectId', 
        'batchNo', 
        'code',
        'amount',
        'isBind', 
        'bindUid',
        'bindDate',
        'status',
        'createdAt', 
        'updatedAt', 
        'syncStatus', 
        '_type'=>array(
            'objectId'=>'int', 
            'batchNo'=>'varchar', 
            'code'=>'varchar',
            'amount'=>'varchar',
            'isBind'=>'int',
            'bindUid'=>'int',
            'bindDate'=>'int',
            'status'=>'int',
            'createdAt'=>'int',
            'updatedAt'=>'int',
            'syncStatus'=>'int'
        )
    );
}
